
#ifndef __MAPGEN_H
#define __MAPGEN_H

#include "utilitys.h"

class MapGen {
public:
	MapGen();
	~MapGen();
	void		setCurrentLocation(Location inn);
	void		setBaseLocation(Location inn);
	int			getTargetLocationsCounter();
	// returns index of target or -1 apon failure.
	int			addTargetLocaton(Location inn);
	Location	getTargetLocation(int targetNr);
	void		changeTargetLocation(Location inn, int targetNr);
	void		clearTargetLocations();
	void		printMapOnScreen(int threshold);
	void		proccessSensorReading(double range, double bearing, int sensorType);
	int			getRows() { return m_mapRows;}
	int			getColums() { return m_mapColums;}
	bool*		getBooleanMap(int threshold);
	Location	getAgentLocation();

private:
	int m_mapRows;
	int m_mapColums;
	int m_reductionStep;
	unsigned char **m_map;
	int m_mapType;
	Location m_currentLocation;
	Location m_baseLocation;
	Location* m_targetLocations;
	int m_targetLocationCounter;
	int m_targetLocationSize;
	Sensor m_sensorTypes[1];

	int*	LocationToSquare(Location inn);
	bool*	AddBoolanMapPadding(bool* inn, int size);
};
#endif
